﻿using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;

namespace peonwar
{
        [Serializable]
    class UnitLight1 : Unit
    {
        // ---CONSTRUCTORS---
        // Creation de l'unite en precisant l'instance du joueur "User"
        public UnitLight1(User player) : base()
        {
            // Caracteristiques de l'unite
            UnitType = 1;
            QueueOffset = 50;

            Initialize(player);
        }

        // ---PROPERTIES---
        // ---METHODES---
        // Animation idle qui joue en boucle
        public override void AnimationIdle()
        {
            base.AnimationIdle();
            Texture = GameTexture.TextureUnitLight1[0];
            Imgwidth = 29;
            Imgheight = 37;
            Indexmax = 5;

            Offset = -2;
        }

        // Animation walk qui est jouer en boucle une fois lancer
        public override void AnimationWalk()
        {
            base.AnimationWalk();
            Texture = GameTexture.TextureUnitLight1[1];
            Imgwidth = 37;
            Imgheight = 40;
            Indexmax = 8;

            Offset = 0;
        }

        // Animation degain de l'arme qui lance ensuite l'animation tirer
        public override void AnimationDrawIn()
        {
            base.AnimationDrawIn();
            Texture = GameTexture.TextureUnitLight1[2];
            Imgwidth = 70;
            Imgheight = 58;
            Indexmax = 13;

            Offset = 0;
        }

        // Animation tirer joue en boucle
        public override void AnimationFire()
        {
            base.AnimationFire();
            Texture = GameTexture.TextureUnitLight1[3];
            Imgwidth = 71;
            Imgheight = 59;
            Indexmax = 9;

            Offset = -1;
        }

        // Animation rengainer l'arme qui lance ensuite l'animation marcher
        public override void AnimationDrawOut()
        {
            base.AnimationDrawOut();
            Texture = GameTexture.TextureUnitLight1[4];
            Imgwidth = 70;
            Imgheight = 57;
            Indexmax = 12;

            Offset = 0;
        }

        // Animation mourrir, pas besoin de l'expliquer
        public override void AnimationDie()
        {
            base.AnimationDie();
            Texture = GameTexture.TextureUnitLight1[5];
            Imgwidth = 72;
            Imgheight = 45;
            Indexmax = 10;

            Offset = -8;
        }

    }
}
